<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="__PUBLIC__/css/edit_address.css" type="text/css">
    <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__PUBLIC__/js/slider.js"></script>
	<script src="__PUBLIC__/js/layer/layer-min.js"></script><!--弹窗js 参考文档 http://layer.layui.com/-->
</head>
<style type="text/css">
.wi80-BFB{width:80%}
.wi40-BFB{width:40%}
.seauii{ padding:7px 10px; margin-right:10px}
.he110{ height:110px}
.di-bl{ display:inherit}
</style>
<body>
<div class="adderss-add">
    <!-- <div class="ner-reac ol_box_4" style="visibility: visible; position: fixed; z-index: 500; width: 100%; height:100%"> -->
        <div class="box-ct" style="height: 400px">
            <div class="box-header">
                <!-- <a href="" class="box-close"></a> -->
            </div>
            <form action="{:U('/Msg/doSendMessage')}" method="post" onSubmit="return checkForm()">
                <table width="90%" border="0" cellspacing="0" cellpadding="0">
                    <input name="call_back" type="hidden" value="call_back" />
                    <tr class="postmessage" style=" height:32px">
                        <td></td>
                        <td>
                            <label for="allvip"  class="allvip">发送给以下用户</label>
                        </td>
                    </tr>
                    <if condition="count($users) gt 0">
                     <tr>
                    	<td align="right" valign="top">用户列表：</td>
                    	<td>
                    	   <select class="form-control" id="user" name="user" style="height:32px;width:183px;">
                    	   		<option>请选择</option>
                                <foreach name="users" item="vv" key="kk">
						       		 <option value ="{$vv.admin_id}">{$vv.name}</option>
						       </foreach>
						   </select>
                        </td>
                    </tr>
                    </if>
                    <tr>
                        <td align="right" valign="top">标题：</td>
                        <td><input name="title" id="title" placeholder="标题" maxlength="100"></td>
                    </tr>
                    <tr>
                        <td align="right" valign="top">发送内容：</td>
                        <td><textarea class="he110 wi80-BFB re-no" name="text" id="text" placeholder="发送内容" maxlength="100"></textarea></td>
                    </tr>
                   <tr style="height:60px">
                        <td class="pa-50-0">&nbsp;</td>
                        <td align="right">
                            <button type="submit" style="padding: 4px 16px;cursor: pointer;"><span>发送</span></button>
                        </td>    
                    </tr>
                </table>
            </form>
        </div>
    <!-- </div> -->
</div>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__PUBLIC__/js/pc_common.js"></script>

<script>
    function checkForm(){
        var user = $('#user option:selected').val();
        var text = $('#text').val();
        var title = $('#title').val();
        var error = '';
        if(user == '请选择'){
            error += '发送用户不能为空 <br/>';
        }
        if(title == ''){
            error += '标题不能为空 <br/>';
        }
        if(text == ''){
            error += '站内信内容不能为空 <br/>';
        }
        if(error){
			layer.alert(error, {icon: 2});
            return false;
        }
        return true;
    }
</script>
</body>
</html>
